<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'reset.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script src="./jquery-2.1.0.js"></script>   
  </head>
  
  <body>
    <div>
    <form action="Resetservlet" method="post" id=form>
    <table>
    <tr>
    <td>原密码：</td><td><input type="text" name="apwd" id="apwd"></td>
    </tr>
    <tr>
    <td>新密码：</td><td><input type="text" name="bpwd" id="bpwd"></td>
    </tr>
    <tr>
    <td>确认密码：</td><td><input type="text" name="cpwd" id="cpwd"></td>
    </tr>
    <tr>
    <td></td><td><input type="button" value="确定" id="sub"></td>
    </tr>
    </table>
    

    </form>
    </div>
<script type="text/javascript">

$("#sub").click(function () {
	if($("#apwd").val()==""){
		alert("原密码不能为空！");
	}else if($("#bpwd").val()==""){
		alert("新密码不能为空！");
	}else if($("#cpwd").val()!=$("#bpwd").val()){
		alert("确认密码必须和新密码相同！");
	}else{
		alert("已修改！");
		$("#form").submit();
	}
});
</script>
  </body>
</html>
